﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using myBoard.App.MagnetStore;
using System.Collections.ObjectModel;

namespace myBoard.App.Model
{
    public class FakeModel
    {
        private Magnet _magnet;
        private ObservableCollection<Magnet> _latestMagnets;

        public ObservableCollection<Magnet> LatestMagnets
        {
            get { return _latestMagnets; }
            set { _latestMagnets = value; }
        }

        public Magnet Magnet
        {
            get { return _magnet; }
            set { _magnet = value; }
        }

        public FakeModel()
        {
            _latestMagnets = new ObservableCollection<Magnet>();

            _magnet = new Magnet();
            _magnet.Author = null;
            //_magnet.Cleared = true;
            _magnet.DownloadUrl = string.Empty;
            _magnet.Id = 0;
            //_magnet.LastUpdate = DateTime.Now;
            _magnet.ShortDesc = "Stream thouthands of musics with imeem magnet";
            _magnet.LongDesc = "We now start to see a lot of audio and video streaming services spawning accross the web. Spotify, imeem, and Deezer are some of them and I just love these services for letting me listen my favorite albums for free no matter where I am. The annoying thing is that for most of theses services, you must have a browser opened for audio/video streaming, so I’ve decided to work on this magnet based on imeem. It lets me search an artist or song, and listen the music directly from the magnet. Like any other magnet, you can start your music and make the player go away by hiding myBoard (but the music still plays in the background).";
            //_magnet.Magnets_Categories = new System.Collections.ObjectModel.ObservableCollection<Magnets_Category>();
            //_magnet.Magnets_Categories.Add(new Magnets_Category() { Category = new Category() { Name = "Tools" } });
            //_magnet.Screenshots = new ObservableCollection<Screenshot>();
            //_magnet.Screenshots.Add(new Screenshot() { Url = @"e:\imeem1.png" });
            //_magnet.MagnetsComments = new System.Collections.ObjectModel.ObservableCollection<MagnetsComment>();
            //_magnet.MagnetsComments.Add(new MagnetsComment() { Description = "Suspendisse potenti. In accumsan, tellus imperdiet tincidunt tristique, mi elit aliquet diam, at molestie sem dui eget enim. Proin mattis rutrum enim, in rutrum justo bibendum et. Mauris et urna augue. Integer aliquam .",
            //Title="Simply the best magnet ever !"});
            _magnet.Name = "Imeem magnet";
            //_magnet.Price = 0;
            _magnet.Size = "856 ko";
            //_magnet.SizeUnit = "Ko";
            _magnet.ThumbnailUrl = @"C:\Users\Yann\Pictures\Icons\Milky\Icons\64\114.png";
            _magnet.VersionMajor = 1;
            _magnet.VersionMinor = 0;
            FillLatestMagnets();
        }

        private void FillLatestMagnets()
        {
            for (int i = 0; i < 3; i++)
            {
                Magnet magnet = new Magnet();
                magnet.Author = null;
                //magnet.Cleared = true;
                magnet.DownloadUrl = string.Empty;
                magnet.Id = 0;
                //magnet.LastUpdate = DateTime.Now;
                magnet.ShortDesc = "Get worldwide forcast with this weather magnet.";
                magnet.LongDesc = "Vestibulum eget arcu ut orci blandit ullamcorper. Etiam dapibus sapien ut tellus semper aliquam. Nullam vehicula orci id risus placerat aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce venenatis urna eu lectus rhoncus facilisis vulputate augue ultrice";
                //magnet.Magnets_Categories = new System.Collections.ObjectModel.ObservableCollection<Magnets_Category>();
                //magnet.Magnets_Categories.Add(new Magnets_Category() { Category = new Category() { Name = "Tools" } });
                //magnet.Screenshots = new ObservableCollection<Screenshot>();
                //magnet.Screenshots.Add(new Screenshot() { Url = @"e:\weather.png" });
                //magnet.MagnetsComments = new System.Collections.ObjectModel.ObservableCollection<MagnetsComment>();
                /*magnet.MagnetsComments.Add(new MagnetsComment()
                {
                    Description = "Suspendisse potenti. In accumsan, tellus imperdiet tincidunt tristique, mi elit aliquet diam, at molestie sem dui eget enim. Proin mattis rutrum enim, in rutrum justo bibendum et. Mauris et urna augue. Integer aliquam .",
                    Title = "Simply the best magnet ever !"
                });*/
                magnet.Name = "Weather";
                //magnet.Price = 0;
                magnet.Size = "856 ko";
                //magnet.SizeUnit = "Ko";
                magnet.ThumbnailUrl = @"C:\Users\Yann\Documents\Mes Projets\myBoard\Application\Magnets\Weather\WeatherMagnet\Images\Icon.png";
                magnet.VersionMajor = 1;
                magnet.VersionMinor = 0;
                _latestMagnets.Add(magnet);
            }
        }
    }
}
